package com.weaver.seconddev.api.tl.price_approval_api;


/**
 * NPS流程类型枚举
 *
 * @author th
 * @date 2023/10/09 13:20
 */
public enum NPSProcessTypeEnums {
    CONTRACT("1","合同"),
    PA("2","价格审批PA");
    private String code;
    private String message;
    NPSProcessTypeEnums(String code, String message){
        this.code = code;
        this.message = message;
    }

    public static NPSProcessTypeEnums fromType(String code) {
        for (NPSProcessTypeEnums valueType : values()) {
            if (String.valueOf(valueType.code).equals(code)) {
                return valueType;
            }
        }
        return NPSProcessTypeEnums.CONTRACT;
    }

    public String getCode() {
        return code;
    }
    public String getMessage(){return message;}
}